// 状态管理
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    title: '加载中',
    username: 'loading',
    loading: false,
  },
  mutations: {
    title (state, value) {
      state.title = value
    },
    username (state, value) {
      state.username = value
    },
    loading (state, value) {
      state.loading = value
    },
  }
})
